package com.rainliang.project.user.basic.bean;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class UserInfo {

	private Long userId;
	private String loginName;
	private String email;
	private String nickName;
	private String sex;
	private Date birthDay;
	private String homeTown;
	private String avatar;
	private Integer deleteFlag;
	
	private Date createTime;
	private Date updateTime;
	private Integer state;
	
	public static UserInfo paraResult(List<Map<String, Object>> result) {
		if(result==null||result.size()<=0)return null;
		Map<String,Object> map=result.get(0);
		if(map==null)return null;
		UserInfo userInfo=new UserInfo();
		userInfo.setUserId((Long)map.get("id"));
		userInfo.setLoginName((String)map.get("login_name"));
		userInfo.setEmail((String)map.get("login_email"));
		userInfo.setNickName((String)map.get("nick_name"));
		userInfo.setSex((String)map.get("sex"));
		userInfo.setBirthDay((Date)map.get("birthDay"));
		userInfo.setCreateTime((Date)map.get("create_time"));
		userInfo.setUpdateTime((Date)map.get("update_time"));
		userInfo.setState((Integer)map.get("state"));
		userInfo.setDeleteFlag((Integer)map.get("delete_flag"));
		return userInfo;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}


	public Integer getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(Integer deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Date getBirthDay() {
		return birthDay;
	}

	public void setBirthDay(Date birthDay) {
		this.birthDay = birthDay;
	}

	public String getHomeTown() {
		return homeTown;
	}

	public void setHomeTown(String homeTown) {
		this.homeTown = homeTown;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	
	
}
